package com.vim.common.thread;

import com.vim.modules.web.model.SysLog;
import com.vim.modules.web.service.SysLogService;

/**
 * 线程:系统日志
 */
public class SysLogThread extends Thread{

    private SysLog sysLog;

    private SysLogService sysLogService;

    public SysLogThread(SysLogService sysLogService, SysLog sysLog){
        this.sysLogService = sysLogService;
        this.sysLog = sysLog;
    }

    @Override
    public void run() {
        if(null != sysLog){
            try {
                sysLogService.save(sysLog);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
